package com.example.service;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.entity.File;
import com.example.entity.Filetype;
import com.example.mapper.FileMapper;
import com.example.mapper.FiletypeMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author admin
 * @since 2021-06-01
 */
@Service
public class FiletypeService extends ServiceImpl<FiletypeMapper, Filetype> implements IService<Filetype> {
    @Resource
    private FiletypeMapper filetypeMapper;

    public Filetype getbyFiletype(String name) {
        Filetype one = getOne((Wrappers.<Filetype>lambdaQuery().eq(Filetype::getFiletype,name)));
        return one;
    }
}
